home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / C / Mesa / src-aux / Smakefile < prev    next >
Encoding:
Makefile  |  1997-06-25  |  2.5 KB  |  98 lines

  1. # Makefile for aux toolkit
  2.  
  3. # Mesa 3-D graphics library
  4. # Version:  1.2.6
  5. # Copyright (C) 1995  Brian Paul  (brianp@ssec.wisc.edu)
  6. #
  7. # This library is free software; you can redistribute it and/or
  8. # modify it under the terms of the GNU Library General Public
  9. # License as published by the Free Software Foundation; either
  10. # version 2 of the License, or (at your option) any later version.
  11. #
  12. # This library is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15. # Library General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Library General Public
  18. # License along with this library; if not, write to the Free
  19. # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21.  
  22. # makefile for SAS/C AmiWin port by Victor Ng-Thow-Hing
  23. # altered to also include Amiga port by StefanZ
  24.  
  25.  
  26. ##### MACROS #####
  27.  
  28.  
  29.  
  30. INCDIR = /include
  31. LIBDIR = /lib
  32. XDIR = x11:sasc
  33.  
  34. TMP_FILE = T:MesaTMP_SCOPTS
  35.  
  36. #SOURCES = glaux.c font.c image.c shapes.c teapot.c vect3d.c xform.c
  37.  
  38. OBJECTS = glaux.o font.o image.o shapes.o teapot.o vect3d.o xxform.o
  39.  
  40. CC = sc
  41. AMIWINSCFLAGS = idir=$(INCDIR) idir=$(XDIR)/include data=far idlen=63 \
  42.           nostkchk IGN=ALL math=68882 cpu=68040 optimize define=AMIWIN
  43.  
  44. AMIGASCFLAGS = idir=$(INCDIR)  data=far idlen=63 with=/amiga/SCOPTIONS\
  45.           nolink IGN=ALL define=AMIGA param=both
  46.  
  47.  
  48. MAKELIB = oml
  49. AUX_LIB = Mesaaux.LIB
  50. LIB_NAME = $(LIBDIR)/$(AUX_LIB)
  51.  
  52. ##### RULES #####
  53. .c.o:
  54.     $(CC) WITH=$(TMP_File) $*.c
  55.  
  56.  
  57. ##### TARGETS #####
  58. default:
  59.     @echo "specify: smake <target>"
  60.     @echo "Where <targets> is one of"
  61.     @echo "       amiga   - Compiles a link library (LIB-file)"
  62.     @echo "       library - Compiles a link library (LIB-file)"
  63.     @echo "                 using the shared library (still beta)"
  64.     @echo "       targets - Compilations for AMIWIN"
  65.  
  66. clean:
  67.     -delete *.o 
  68.  
  69. targets: AMIWINLIB
  70.  
  71. amiga: CreateAmigaLIB
  72.  
  73. library: AmigaLIBsh
  74.  
  75. # Make the library
  76. CreateAmigaLIB: AmigaLIB $(OBJECTS) DeleteTMP
  77.     $(MAKELIB) $(LIB_NAME) R $(OBJECTS)
  78.  
  79. AmigaLIBsh: AmigaLibrary $(OBJECTS) DeleteTMP
  80.     $(MAKELIB) $(LIB_NAME) R $(OBJECTS)
  81.  
  82. AMIWINLIB: AMIWIN $(OBJECTS) DeleteTMP
  83.     $(MAKELIB) $(LIB_NAME) R $(OBJECTS)
  84.  
  85. # Makes temporary scoptions to use in global .c.o    
  86. AmigaLIB:
  87.     @echo >$(TMP_FILE) "$(AMIGASCFLAGS) define=AMIGALIB"
  88.  
  89. AmigaLibrary:
  90.     @echo >$(TMP_FILE) "$(LIBRARYSCFLAGS)"
  91.  
  92. AMIWIN:
  93.     @echo >$(TMP_FILE) "$(AMIWINSCFLAGS)"
  94.  
  95. DeleteTMP:
  96.     @delete $(TMP_FILE)
  97.  
  98.